package com.atgouwu.scmall.order;

import com.alicp.jetcache.anno.config.EnableMethodCache;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

@EnableRedisHttpSession //开启SpringSession分布式session共享
@EnableMethodCache(basePackages = "com.atgouwu.scmall.order")  //整合阿里JetCache缓存,开启在方法上用@cached注解
@EnableFeignClients(basePackages = "com.atgouwu.scmall.order.feign") //开启openfeign远程调用(扫描feign包)
@EnableDiscoveryClient //开启nacos注册发现
@SpringBootApplication
public class OrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class, args);
        System.out.println("订单服务启动成功!");
    }

}
